package com.qiaoba.module.system.entity.dto;

import com.qiaoba.common.base.validate.AddGroup;
import com.qiaoba.common.base.validate.EditGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 字典类型 DTO
 *
 * @author ailanyin
 * @date 2023-09-10 16:48:37
 */
@Data
public class SysDictTypeDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    @Size(max = 20, message = "主键不能超过{max}个字符", groups = {EditGroup.class})
    private String dictId;

    @Schema(description = "字典名称")
    @NotBlank(message = "字典名称不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 30, message = "字典名称不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String dictName;

    @Schema(description = "字典类型")
    @NotBlank(message = "字典类型不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 30, message = "字典类型不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String dictType;

    @Schema(description = "状态（1正常 0停用）")
    @NotBlank(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 1, message = "状态不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String status;

    @Schema(description = "备注")
    @Size(max = 500, message = "备注不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String remark;
}
